package cn.zs.middleware.test;

import cn.zs.middleware.domain.xxx.adapter.repository.IAwardRepository;
import cn.zs.middleware.infrastructure.dao.IAwardDao;
import cn.zs.middleware.infrastructure.dao.po.Award;
import cn.zs.middleware.infrastructure.redis.IRedisService;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.redisson.api.RBucket;
import org.redisson.api.RedissonClient;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.List;

@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest
public class ApiTest {

    @Resource
    private IAwardDao awardDao;
    
    @Resource
    private IRedisService  redisService;

    @Resource
    private IAwardRepository  awardRepository;


    @Test
    public void test() {
        log.info("测试完成");
        String s = awardRepository.queryAwardList();
        System.out.println(s);



    }
    @Test
    public void testRedis()  {
        Object value = redisService.getValue("AwardCacheAll:all");
        System.out.println(value);

    }


    @Test
    public void testRedisison() {

    }
}
